package com.showcai.admin.service;

import com.github.pagehelper.PageInfo;
import com.showcai.module.vo.News;
import com.showcai.module.vo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;
import java.util.Map;

/**
 * Created by Baggio on 2018-6-25.
 */
@FeignClient(name = "service-user")
public interface UserServiceClient {

    @RequestMapping(value="/user/user/{id}",method= RequestMethod.GET)
    User getUser(@PathVariable("id") Long id);

    @RequestMapping(value="/user/newsList",method= RequestMethod.GET)
    List<News> getNewsList(@RequestBody Map<String, String> map);

    @RequestMapping(value="/user/newsList1",method= RequestMethod.GET)
    PageInfo getNewsList1(@RequestBody Map<String, String> map);
}
